package designpattern.responsibility.dem01;

/**
 * @author cyt
 * @create 2020-07-20 14:33
 */
public class ThreeApprover extends BaseApprover {
    public ThreeApprover(String name) {
        super(name);
    }

    private long min = 10000;

    @Override
    public void processRequest(Request request) {
        if (request.getPrice() > min) {
            System.out.println("请求编号 => " + request.getId() + " 处理 = 》 " + this.name);
        } else {
            approver.processRequest(request);
        }
    }
}
